<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{commons/public::common-public}">
	<meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=no" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
	<meta http-equiv="X-UA-Compatible" content="IE=8" />
	<title>学生列表</title>
</head>
<body>
<div id="wrapper">
	<header th:replace="~{commons/header::common-header(activeUrl='students')}"></header>
	<div id="page-wrapper">
		<div class="container-fluid">
			<!-- Page Heading -->
			<div class="row">
				<div class="col-lg-12">
					<h1 class="page-header" th:text="学生管理"></h1>
					<ol class="breadcrumb">
						<li><i class="fa fa-dashboard"></i> <a href="main" th:text="系统主页"></a>
						</li>
						<li class="active"><i class="fa fa-table"></i> <span th:text="学生列表"></span></li>
					</ol>
				</div>
			</div>
			<div class="row" th:if="${not #strings.isEmpty(message)}">
				<div class="col-lg-12">
					<div class="alert alert-info alert-dismissable">
						<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
						<i class="fa fa-info-circle"></i> <strong th:text="${message}"></strong>
					</div>
				</div>
			</div>
			<!-- /.row -->
			<div class="row">
				<div class="col-lg-12">
					<h2 th:text="学生列表"></h2>
					<div class="table-responsive">
						<a class="pull-right btn" th:href="@{/student}" th:text="#{add.user}"></a>
						<table class="table table-striped table-sm">
							<thead>
							<tr>
								<th th:text="#{id}"></th>
								<th th:text="#{userName}"></th>
								<th th:text="#{password}"></th>
								<th th:text="#{gender}"></th>
								<th th:text="#{note}"></th>
								<th th:text="#{birthday}"></th>
								<th th:text="创建时间"></th>
								<th th:text="#{operation}"></th>
							</tr>
							</thead>
							<tbody>
							<tr th:each="u:${stuList}">
								<td th:text="${u.id}"></td>
								<td th:text="${u.stuName}"></td>
								<td th:text="${u.password}"></td>
								<td th:text="${u.sex}==0?'女':'男'"></td>
								<td th:text="${u.note}"></td>
								<td th:text="${#dates.format(u.birthday, 'yyyy-MM-dd HH:mm')}"></td>
								<td th:text="${#dates.format(u.createTime, 'yyyy-MM-dd HH:mm')}"></td>
								<td>
									<a class="btn btn-sm btn-success" th:href="@{/student/edit/}+${u.id}" >修改</a>
					
								   <a class="btn btn-sm btn-danger deleteBtn" th:href="@{/delete/}+${u.id}" onclick="return confirm('确定要删除吗')" >删除</a>
								</td>
							</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
			<!-- /.row -->
		</div>
	</div>
</div>


</body>
</html>